package com.cxria.pattern.status.func1

import groovy.transform.Immutable

@Immutable
class StoppingState extends LiftState {

    @Override
    void open() {
        context.liftState = Context.openningState
        context.liftState.open()
    }

    @Override
    void close() {

    }

    @Override
    void run() {
        context.liftState = Context.runningState
        context.liftState.run()
    }

    @Override
    void stop() {
        println '电梯停止了...'
    }

}
